Repository navigation
Test body kind names and the ring catalogue - #53
Conversation
kindName and SolarSystem::rings() were the only public orrery_core functions no test referenced. test_ephemeris now checks the word each BodyKind is shown as (the HUD and the USD layer's `kind`), the kinds of real catalogue bodies, and the six rings against tools/bodies.py's committed NSSDCA radii: order, owning planet, inside/outside radius, outside the planet's sphere, and colour and opacity in range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the body-kind and ring-catalogue characterization test changes.
No open issues 🎉
What changed in this PR
Adds characterization tests for orrery_core body-kind names and the ring catalogue, covering data used by the HUD, USD export, and ring rendering. No production code or existing test tolerances change.
Changes:
- Checks all six body-kind labels and the kinds assigned to representative catalogue bodies.
- Validates ring order, names, owning planets, exact radii, clearance from planet surfaces, and colour/opacity ranges.
- Updates the README to describe the expanded test coverage.
| File | Description |
|---|---|
| tests/test_ephemeris.cpp | Adds body-kind and six-ring catalogue checks. |
| README.md | Documents the new test_ephemeris checks. |
Review effort: Balanced
|
Self-review rubric (head
Local verification was UNVERIFIED: CMake and uv were unavailable in the sandbox. The CI run on the exact head SHA is the anchor and is green. A Copilot review on the same head reported no issues. The PR is ready to merge: it matches no do-not-auto-merge path. This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
Summary
kindNameandSolarSystem::rings()were the only publicorrery_corefunctions that no test referenced. Both feed visible output:kindNameis the word after a body's name in the HUD and thekindattribute in the--export-usdalayer, andrings()drives the ring meshes.tests/test_ephemeris.cppchecks:BodyKind(star,planet,dwarf planet,moon,comet,spacecraft), plus the kinds of real catalogue bodies (Sun, Earth, Pluto, Ceres, Moon, Charon, Halley, Voyager 1).tools/bodies.py. That covers their order, owning planet, exact inner and outer radii, that each ring lies outside its planet's drawn sphere, and that colour and opacity stay in range. The radii are committed constants, not fetched JPL data, so exact comparison holds for any later fetch.test_ephemeriswas updated to name the new checks.These are characterization tests only: no production code changes and no existing
CHECKor tolerance touched. This is Stage B (unit-test expansion) work. The open-issue backlog was empty at triage.Documentation sweep (Stage A) beforehand found no drift. These were checked against the source:
usage()against every flagparse()acceptsapp/main.cpptools/bodies.py(24 + Moon = 25; group counts sum to 12,584)fetch_data.py plan's job list (24 + 4 + 3 + 3 + 24 + 5 + 3 = 66)DATA_SOURCES.mdkernel SHA-256s againstdata/kernels.sha256CMakeLists.txtNo tracking issue. The coverage gap was found during triage.
Test plan
Data, ephemeris tests, render smoke testgreen on the PR head, with theephemerisctest printing the new section andALL PASSEDgit ls-files data/raw data/catalog tests/datais empty;strata.ref,data/kernels.sha256and.gitignoreare untouchedLocal verification: UNVERIFIED. CMake and uv could not run in the sandbox this change was prepared in. The CI run on the exact head SHA is the anchor.
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson